<?php
/**
 * @Copyright Copyright (C) 2010-2012
 * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
 + Created by:          Webit Solution
 * Company:		Webit Solution
 + Contact:		www.webits.asia, developer@webits.asia
 * Created on:	Mar 21, 2012
 ^
 + Project: 		WRecruit
 * File Name:	views/application/tmpl/viewjob.php
 ^ 
 * Description: template view for a job
 ^ 
 * History:		NONE
 ^ 
 */
 
 defined('_JEXEC') or die('Restricted access');
  global $mainframe;
  $document =& JFactory::getDocument();
   $document->addStyleSheet('components/com_wrecruit/css/'.$this->config['theme']);
?>
<?php if ($this->config['offline'] == '1'){ ?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" >
	<tr><td valign="top" class="<?php echo $this->theme['title']; ?>" >	<?php echo $this->config['title']; ?></td></tr>
	<tr><td height="25"></td></tr>
	<tr><td class="wrecruitmsg">
		<?php echo $this->config['offline_text']; ?>
	</td></tr>
</table>	
<?php }else{ ?>

<table cellpadding="0" cellspacing="0" border="0" width="100%" >
	<tr><td valign="top" class="<?php echo $this->theme['title']; ?>" >	
		<?php echo $this->config['title']; ?>
	</td>
	</tr>
	<tr><td height="23"></td></tr>
	<?php if ($this->config['cur_location'] == 1) {?>
	<tr><td height="0"></td></tr>
	<tr><td class="curloc"><?php echo JText::_('JS_CUR_LOC'); ?> : <a href="index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=mydepartments&Itemid=<?php echo $this->Itemid; ?>" class="curloclnk" ><?php echo JText::_('JS_MY_DEPARTMENTS'); ?></a> > <?php echo JText::_('JS_VIEW_DEPARTMENT'); ?>
	</td></tr>
	<?php } ?>
	<tr><td>
		<?php 
			if (sizeof($this->employerlinks) != 0){
				echo '<div id="toplinks"><ul>';
				foreach($this->employerlinks as $lnk)	{ ?>
					<span <?php if($lnk[2] == 1)echo 'class="first"'; elseif($lnk[2] == -1)echo 'class="last"';  ?>>
						<a href="<?php echo $lnk[0]; ?>"> <?php echo $lnk[1]; ?></a>
					</span>
				<?php }
				echo '<ul></div>';			
			}
		?>
	</td></tr>	
	<tr><td>
		<?php 
			if (sizeof($this->jobseekerlinks) != 0){
				echo '<div id="toplinks"><ul>';
				foreach($this->jobseekerlinks as $lnk)	{ ?>
					<span <?php if($lnk[2] == 1)echo 'class="first"'; elseif($lnk[2] == -1)echo 'class="last"';  ?>>
						<a href="<?php echo $lnk[0]; ?>"> <?php echo $lnk[1]; ?></a>
					</span>
				<?php }
				echo '<ul></div>';			
			}
		?>
	</td></tr>	
	<tr><td height="3"></td></tr>
	<tr><td class="<?php echo $this->theme['heading']; ?>" align="center">
		<?php echo JText::_('JS_DEPARTMENT_INFO'); ?>
	</td></tr>
	<tr><td height="3"></td></tr>
</table>
	<?php if( isset($this->department)){ ?>
	<table cellpadding="0" cellspacing="0" border="0" width="100%" >
      <tr>
        <td colspan="3" height="5"></td>
      </tr>
		<?php
		$trclass = array("odd", "even");
		
		$isodd = 0;
		?>
                  <tr class="<?php echo $this->theme[$trclass[$isodd]]; ?>"><td width="7"></td>
                    <td class="maintext"><b><?php echo JText::_('JS_NAME'); ?></b></td>
                            <td class="maintext"><?php echo $this->department->name; ?></td>
                  </tr>



                             <tr class="<?php echo $this->theme[$trclass[1 - $isodd]]; ?>"><td></td>
                    <td class="maintext"><b><?php echo JText::_('JS_COMPANY'); ?></b></td>
                            <td class="maintext">

                                    <?php
                                    $link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=view_company&vm=1&md='.$this->department->companyid.'&Itemid='.$this->Itemid; ?>
                                    <a href="<?php echo $link?>"><strong><?php echo $this->department->companyname; ?></strong></a>
                            </td>
                  </tr>


                      <tr class="<?php echo $this->theme[$trclass[$isodd]]; ?>"><td width="7"></td>
                    <td class="maintext"><b><?php echo JText::_('JS_DESCRIPTION'); ?></b></td>
                            <td class="maintext"><?php echo $this->department->description; ?></td>
                  </tr>

    <tr>
    <tr>
        <td colspan="2" height="10"></td>
      <tr>
    </table>
	
	<?php }else echo JText::_('JS_RESULT_NOT_FOUND'); ?>
<?php 
}//ol
?>
<div width="100%">
<?php 
if($this->config['fr_cr_txsh']) {
	echo 
	'<table width="100%" style="table-layout:fixed;">
		<tr><td height="15"></td></tr>
		<tr><td style="vertical-align:top;" align="center">'.$this->config['fr_cr_txa'].$this->config['fr_cr_txb'].'</td></tr>
	</table>';
}	
?>
</div>
